<div class="mylib_view">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="col-md-2">
                <ul class="nav nav-pills nav-stacked text-center">
                    <li role="presentation" ng-class="panel_show == 'zjxx'||panel_show == undefined || panel_show == 'xgxx' || panel_show == 'xgmm' ? 'active':''" ng-click="panel_show = 'zjxx'"><a>证件信息</a></li>
                    <li role="presentation" ng-class="panel_show == 'dqjy'?'active':''" ng-click="panel_show = 'dqjy'"><a>当前借阅</a></li>
                    <li role="presentation" ng-class="panel_show == 'jyls'?'active':''" ng-click="panel_show = 'jyls'"><a>借阅历史</a></li>
                    <li role="presentation" ng-class="panel_show == 'yyxx'?'active':''" ng-click="panel_show = 'yyxx'"><a>预约信息</a></li>
                    <li role="presentation" ng-class="panel_show == 'wdsj'?'active':''" ng-click="panel_show = 'wdsj'"><a>我的书架</a></li>
                </ul>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'zjxx' || panel_show == undefined">
                <h4 class="menu_title">我的证件信息</h4>
                <strong class="id_bookinfo">五天内即将过期图书<a class="id_bookinfo_a">[0]</a>，已超期图书<a class="id_bookinfo_a">[0]</a>，预约到书<a class="id_bookinfo_a">[0]</a>。</strong>
                <button type="button" class="btn btn-primary btn-xs" ng-click="show_userinfo()">修改信息</button>
                <button type="button" class="btn btn-primary btn-xs" ng-click="panel_show = 'xgmm'">修改密码</button>
                <div class="table-responsive">
                    <table class="table">
                        <tbody>
                            <tr>
                                <th scope="row">姓名：<span>{{user.username}}</span></th>
                                <td>证件号：<span>{{user.loanid}}</span></td>
                                <td>性别：<span>{{user.sex?'女':'男'}}</span></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <th scope="row">科室：<span>{{user.util | dep_name:dep_list}}</span></th>
                                <td>借阅等级：<span>01</span></td>
                                <td>最大可借图书：<span>10</span></td>
                                <td>最大可预约图书：<span>5</span></td>
                                <td>累计借书：<span>120</span>册次</td>
                            </tr>
                            <tr>
                                <th scope="row">工号：<span>{{user.userId}}</span></th>
                                <td>手机：<span>{{user.mobile_phone?user.mobile_phone:'未填写'}}</span></td>
                                <td>Email：<span>{{user.email?user.email:'未填写'}}</span></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'xgxx'">
                <div class="col-md-6">
                    <h4 class="menu_title">修改联系信息</h4>
                </div>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'xgmm'">
                <div class="col-md-6">
                    <h4 class="menu_title">修改登录密码</h4>
                    <div class="form-group">
                        <label class="col-sm-3 control-label text-right">原密码：</label>
                        <div class="col-sm-9">
                            <input class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label text-right">新密码：</label>
                        <div class="col-sm-9">
                            <input class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label text-right">确认新密码：</label>
                        <div class="col-sm-9">
                            <input class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-5 col-sm-1 text-right">
                            <button type="submit" class="btn btn-primary btn-sm">确定</button>
                        </div>
                        <div class="col-sm-2 text-right">
                            <button type="submit" class="btn btn-defaut btn-sm" ng-click="panel_show = 'zjxx'">返回</button>
                        </div>
                    </div>
                    </form>
                </div>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'dqjy'">
                <h4 class="menu_title">我的当前借阅</h4>
                <strong class="id_bookinfo">当前借阅<a class="id_bookinfo_a">[{{lend_history_now.length?lend_history_now.length:0}}]</a>，最大借阅<a class="id_bookinfo_a">[10]</a>。</strong>
                <div class="table-responsive">
                    <table class="table table-hover table-condensed text-center">
                        <thead>
                            <tr class="active">
                                <th></th>
                                <th class="text-center">条码号</th>
                                <th class="text-center">题名</th>
                                <th class="text-center">责任者</th>
                                <th class="text-center">借阅日期</th>
                                <th class="text-center">应还日期</th>
                                <th class="text-center">馆藏地</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="detail in lend_history_now">
                                <td>{{$index+1}}</td>
                                <td>{{detail.barCode}}</td>
                                <td>{{detail.title}}</td>
                                <td>{{detail.author}}</td>
                                <td>{{detail.addTime | time_compose}}</td>
                                <td>{{detail.shouldReturnTime | time_compose}}</td>
                                <td>下沙馆</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'jyls'">
                <h4 class="menu_title">我的借阅历史</h4>
                <div class="table-responsive">
                    <table class="table table-hover table-condensed text-center" style="margin-bottom:0px;">
                        <thead>
                            <tr class="active">
                                <th></th>
                                <th class="text-center">条码号</th>
                                <th class="text-center">题名</th>
                                <th class="text-center">责任者</th>
                                <th class="text-center">借阅日期</th>
                                <th class="text-center">归还日期</th>
                                <th class="text-center">馆藏地</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="detail in lend_history">
                                <td>{{$index+1}}</td>
                                <td>{{detail.isbn}}</td>
                                <td>{{detail.title}}</td>
                                <td>{{detail.author}}</td>
                                <td>{{detail.addTime | time_compose}}</td>
                                <td>{{detail.shouldReturnTime | time_compose}}</td>
                                <td>下沙馆</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'yyxx'">
                <h4 class="menu_title">我的预约信息</h4>
                <div class="table-responsive">
                    <table class="table table-hover table-condensed text-center">
                        <thead>
                            <tr class="active">
                                <th></th>
                                <th class="text-center">索书号</th>
                                <th class="text-center">书名</th>
                                <th class="text-center">责任者</th>
                                <th class="text-center">申请预约</th>
                                <th class="text-center">截止日期</th>
                                <th class="text-center">取消预约</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="detail in myLoan_list">
                                <td>{{$index + 1}}</td>
                                <td>{{detail.category}}</td>
                                <td>{{detail.title}}</td>
                                <td>{{detail.author}}</td>
                                <td>{{detail.addTime | time_compose}}</td>
                                <td>{{detail.shouldCancelTime | time_compose}}</td>
                                <td>
                                    <button type="button" class="btn btn-danger btn-xs" ng-click="cancel_myloan({{detail}})">取消</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-md-10" ng-show="panel_show == 'wdsj'">
                <h4 class="menu_title">我的书架</h4>
                <div class="form-horizontal">
                    <div class="table-responsive">
                        <table class="table table-hover table-condensed text-center">
                            <thead>
                                <tr class="active">
                                    <th></th>
                                    <th class="text-center">题名</th>
                                    <th class="text-center">责任者</th>
                                    <th class="text-center">出版社</th>
                                    <th class="text-center">出版日期</th>
                                    <th class="text-center">索书号</th>
                                    <th class="text-center">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="detail in myBookShelf_list">
                                    <td>{{$index+1}}</td>
                                    <td>{{detail.title}}</td>
                                    <td>{{detail.author}}</td>
                                    <td>科学工业出版社</td>
                                    <td>2015-10-10</td>
                                    <td>B5/34-2</td>
                                    <td>
                                        <button type="button" class="btn btn-warning btn-xs" ng-click="unCollectABook({{detail.isbn}})">取消收藏</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="userinfomodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <form id="edit_info_form" method="post">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">修改用户信息</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">Email：</label>
                            <div class="col-sm-9">
                                <input class="form-control" ng-model="edit_info.email">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">座机：</label>
                            <div class="col-sm-9">
                                <input class="form-control" ng-model="edit_info.phone">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">手机：</label>
                            <div class="col-sm-9">
                                <input class="form-control" ng-model="edit_info.mobile_phone">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">qq：</label>
                            <div class="col-sm-9">
                                <input class="form-control" ng-model="edit_info.qq">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">住址：</label>
                            <div class="col-sm-9">
                                <input class="form-control input_inline" ng-model="edit_info.address">
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="submit" class="btn btn-primary" ng-click="save_info()">保存修改</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>